@filigran/chatbot 3.20.0 → 3.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -1
- package/README.md +1 -1
- package/dist/index.d.ts +14 -3
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,7 +8,18 @@ the versions follow [semantic versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
8
8
|
This file starts at 3.10.0; earlier releases are on the
|
|
9
9
|
[releases page](https://github.com/FiligranHQ/filigran-ui/releases).
|
|
10
10
|
|
|
11
|
-
## 3.
|
|
11
|
+
## 3.21.0 — unreleased
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- `onConversationChange` says why the conversation changed: its second argument
|
|
16
|
+
is `{ created }`, true for a conversation the panel has just created from a
|
|
17
|
+
new chat (its first message or file), false for one opened from the list, on
|
|
18
|
+
a reload or in place of a deleted one, and when it is left for a new chat. A
|
|
19
|
+
host could not tell an opened conversation from a created one, as both came
|
|
20
|
+
after a new chat.
|
|
21
|
+
|
|
22
|
+
## 3.20.0 — 2026-11-10
|
|
12
23
|
|
|
13
24
|
### Added
|
|
14
25
|
|
package/README.md
CHANGED
|
@@ -105,7 +105,7 @@ import { ChatPanel } from '@filigran/chatbot';
|
|
|
105
105
|
| `composerToolbar` | `React.ReactNode` | — | Extra controls appended to the composer toolbar. The escape hatch for host-specific affordances (XTM One's session-tool picker) — the package never learns what they are. Pass nothing and the toolbar simply has none. |
|
|
106
106
|
| `storageKeyPrefix` | `string` | — | Namespaces every key the panel keeps in browser storage (`<prefix>:filigranChatConversationId`, …), for a host mounting more than one panel |
|
|
107
107
|
| `conversationId` | `string \| null` | — | The conversation on screen when the host owns it (a `?c=` URL); `null` is a new chat. Left `undefined`, the panel remembers its own, and a host-owned one is never written to storage |
|
|
108
|
-
| `onConversationChange` | `(id: string \| null) => void`
|
|
108
|
+
| `onConversationChange` | `(id: string \| null, change: { created: boolean }) => void` | — | Called whenever the conversation on screen changes, whoever changed it (a first answer, New chat, the history); `created` is true for one the panel has just created from a new chat (its first message or file) |
|
|
109
109
|
| `initialAgent` | `string` | — | Agent selected once the list loads, by id or slug, over the remembered one |
|
|
110
110
|
| `onAgentChange` | `(agent: XtmAgent) => void` | — | Called when another agent is picked, in the menu or by opening a conversation of another agent: the picker follows the conversation on screen |
|
|
111
111
|
| `readOnly` | `boolean` | `false` | Hides the composer: a conversation the user may read but not write to |
|
package/dist/index.d.ts
CHANGED
|
@@ -618,8 +618,14 @@ interface ChatPanelProps {
|
|
|
618
618
|
* is a new chat. Left `undefined`, the panel remembers its own.
|
|
619
619
|
*/
|
|
620
620
|
conversationId?: string | null;
|
|
621
|
-
/**
|
|
622
|
-
|
|
621
|
+
/**
|
|
622
|
+
* Called whenever the conversation on screen changes, whoever changed it.
|
|
623
|
+
* `created` is true for a conversation the panel has just created from a new
|
|
624
|
+
* chat (its first message or file), false for one opened or left (the list, a
|
|
625
|
+
* reload, a new chat) and for one the backend put in place of a deleted one
|
|
626
|
+
* that was opened.
|
|
627
|
+
*/
|
|
628
|
+
onConversationChange?: (conversationId: string | null, change: ChatConversationChange) => void;
|
|
623
629
|
/** Agent selected once the list loads, by id or slug, over the remembered one. */
|
|
624
630
|
initialAgent?: string;
|
|
625
631
|
/**
|
|
@@ -954,6 +960,11 @@ interface ChatStreamEventInfo {
|
|
|
954
960
|
/** The frame acknowledges a turn replayed from its start (`thinking` with `resumed`). */
|
|
955
961
|
replayed?: boolean;
|
|
956
962
|
}
|
|
963
|
+
/** Why the conversation on screen changed (see `onConversationChange`). */
|
|
964
|
+
interface ChatConversationChange {
|
|
965
|
+
/** The panel has just created this conversation from a new chat; false when it was opened, replaced or left. */
|
|
966
|
+
created: boolean;
|
|
967
|
+
}
|
|
957
968
|
/** What a host can do to a mounted panel, through its `ref`. */
|
|
958
969
|
interface ChatPanelHandle {
|
|
959
970
|
/** Send *text* as the user, leaving the composer's own draft alone; resolves to what became of it. */
|
|
@@ -1429,4 +1440,4 @@ interface TransferredAgent {
|
|
|
1429
1440
|
declare const voiceCallSupported: () => boolean;
|
|
1430
1441
|
|
|
1431
1442
|
export { ChatPanel, ChatToggleButton, voiceCallSupported };
|
|
1432
|
-
export type { AgentStatusState, ApiEndpoints, BackendType, ChatAnsweredBy, ChatArtifact, ChatArtifactKind, ChatAttachment, ChatCodeBlockContext, ChatCodeBlockRenderer, ChatContextBreakdown, ChatContextUsage, ChatConversationAction, ChatConversationRef, ChatConversationReferenceCandidate, ChatConversationSummary, ChatFile, ChatFileRefusal, ChatHeaderContext, ChatHeldOutcome, ChatMarkerContext, ChatMarkerRenderer, ChatMessage, ChatMessagePersistedFeedback, ChatMessageSlotContext, ChatMode, ChatPanelHandle, ChatPanelMode, ChatPanelProps, ChatPanelTheme, ChatPromptTemplate, ChatQuotaStatus, ChatSendDecision, ChatSendDraft, ChatSendOptions, ChatSendOutcome, ChatSidebarSearch, ChatStreamEventInfo, ChatToggleButtonProps, ChatToolLabels, ChatTurnEnd, ChatTurnOutcome, ChatWorkspace, ConsultStatus, MessageFeedback, ToolApprovalDecision, ToolApprovalProposal, ToolApprovalVerdict, TransferredAgent, Translate, XtmAgent };
|
|
1443
|
+
export type { AgentStatusState, ApiEndpoints, BackendType, ChatAnsweredBy, ChatArtifact, ChatArtifactKind, ChatAttachment, ChatCodeBlockContext, ChatCodeBlockRenderer, ChatContextBreakdown, ChatContextUsage, ChatConversationAction, ChatConversationChange, ChatConversationRef, ChatConversationReferenceCandidate, ChatConversationSummary, ChatFile, ChatFileRefusal, ChatHeaderContext, ChatHeldOutcome, ChatMarkerContext, ChatMarkerRenderer, ChatMessage, ChatMessagePersistedFeedback, ChatMessageSlotContext, ChatMode, ChatPanelHandle, ChatPanelMode, ChatPanelProps, ChatPanelTheme, ChatPromptTemplate, ChatQuotaStatus, ChatSendDecision, ChatSendDraft, ChatSendOptions, ChatSendOutcome, ChatSidebarSearch, ChatStreamEventInfo, ChatToggleButtonProps, ChatToolLabels, ChatTurnEnd, ChatTurnOutcome, ChatWorkspace, ConsultStatus, MessageFeedback, ToolApprovalDecision, ToolApprovalProposal, ToolApprovalVerdict, TransferredAgent, Translate, XtmAgent };
|